using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using ObjectModel;

namespace CAO
{
    public class DataService : MarshalByRefObject, IDataService 
    {
        DAL.Repository repository;

        #region ctor
        public DataService()
        {
            repository = new DAL.Repository();
        }
        #endregion

        #region methods
        public ItemBase GetItemById(Type clazz, int id)
        {
            return repository.GetItemById(clazz, id);
        }

        public IList FindByCriteria(string query, Type[] types, object[] values)
        {
            return repository.FindByCriteria(query, types, values);
        }

        public bool ObjectIsInitialized(IList nativeCollection)
        {
            return repository.ObjectIsInitialized(nativeCollection);
        }
        public IList ReconnectSession(ItemBase item, IList nativeColl)
        {
            return repository.ReconnectSession(item, nativeColl);
        }
        #endregion
    }
}
